<center>
<?php

$dbuser = 'cs3380sp11grp2';
$dbpass = 'rHJmBSWL';
$dbname = 'dbase1';
            // try connecting to the database
    $dbconn = oci_connect($dbuser, $dbpass, $dbname);

    // check for any errors
    if (!$dbconn)
    {
     $e = oci_error();
	 echo 'I Suck At Life';
     print htmlentities($e['message']);
     exit;
    }

    // else there weren't any errors
    else
    {
     echo 'I am an Oracle mack daddy.';
    }
	//Form query
$query = "SELECT USERNAME, ADDRESSCITY FROM USERS";
//Prepare and execute query
$parsed = oci_parse($dbconn, $query);
oci_execute($parsed);
// Fetch results
$nrows = oci_fetch_all($parsed, $results);
//Display results
echo "<table border=1>\n";
for($i = 0; $i<$nrows; $i++)
{
$name = $results['USERNAME'][$i];
$pop = $results['ADDRESSCITY'][$i];
echo "<tr>\n";
echo "<td>$name</td>\n";
echo "<td>$pop</td>\n";
echo "</tr>\n";
}
echo "</table>\b";

//Free result set
oci_free_statement($parsed);
//Close database connection
oci_close($dbconn);
?>
</center>

